package amqp.tutorials.all.topic;


import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TopicSender {


    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void send() {
        rabbitTemplate.convertAndSend("topicExchange", "a.bc.d", "a.bc.d");
        rabbitTemplate.convertAndSend("topicExchange", "a.bc", "a.bc");
        rabbitTemplate.convertAndSend("topicExchange", "bc", "bc");

    }
}
